<!--  -->
<template>
  <px-dialog v-model="visible" width="70%" @close="closeDialog" @open="opneDialog">
    <px-scrollbar max-height="700px">
      <div class="rule-detail-content">
        <ViewInspecDetail :isMain="isMain" :isView="visible" :checkRuleNo="checkRuleNo" @backMainPage="closeDialog" />
      </div>
    </px-scrollbar>
  </px-dialog>
</template>
<script setup lang="ts">
import { ref, watch } from "vue";
import ViewInspecDetail from "../../rule/components/ViewInspecDetail.vue";

const visible = defineModel("visible");
const isMain = ref(true);
const checkRuleNo = defineModel("checkRuleNo");
const emits = defineEmits(["close"]);
function opneDialog() {
  isMain.value = false;
}
function reset() {
  checkRuleNo.value = "";
}
function closeDialog() {
  visible.value = false;
  isMain.value = true;
  emits("close");
  reset();
}
</script>
<style lang="scss" scoped>
.rule-detail-content {
  max-height: 700px;
}
</style>
